<template>
<!-- 获取到全部博客内容，传递给子模板 -->
    <div>
      <blogshow :mothed="mothed"></blogshow>
    </div>
</template>

<script>
import blogshow from './blogshow'
export default {
    data () {
      return {
        user:{},
        mothed:"all",
        // blogData:[1,2],
      }
    },

    methods: {
      //获取博客内容
      getBlog(){
        this.$axios.post(this.blogUrl,{

        })
        .then((result) => {
          
          this.blogData=result.data
          // console.log(this.blogData)
        }).catch((err) => {
          
        });
      },
      //获取用户信息
      getUser(){
        this.user=JSON.parse(localStorage.getItem("user")) ;
      }
    },
    created(){
      this.getBlog()
    },
    mounted:function(){
      // this.getBlog()
    },
    components: {
      blogshow
    },
}
</script>

<style scoped>
</style>